<% new_action = {:ecase => :new_from_ecase, :event => :new_from_event} %>
<% if !@ref.video_link && @ref.slideshow.nil? %>
    <div class="content_left_nedited">
    <% if can_edit_ecase?(@ref) %>
        <%= link_to_remote 'Add Video', {:update => "sv_admin",
            :after => "insertWaitingImg('sv_admin')",
            :url => {:controller => "video", :action => :add_video, :id => @ref.id, :v_type => @ref.get_type }}, {:class => 'add_link'}  %> or
        <%= link_to_remote 'Add SlideShow', {:update => "sv_admin",
            :after => "insertWaitingImg('sv_admin')",
            :url => {:controller => "slideshows", :action => new_action[@ref.get_type.to_sym], :ref_id => @ref.id }}, {:class => 'add_link'}  %>
    <% end %>
    </div>
<% else %>
    <% if @ref.video_link %>
      <%= render :partial => "/video/video_admin"  %>
    <% else %>
      <%= render :partial => "/slideshows/slideshow_admin"  %>
    <% end %>
<% end %>